import http from '@/service/http'
import type * as T from '@/types/api/index'
const routerApi: T.IRouterApi = {
  roleList() {
    return http.get('/admin/menu')
  },
  allList() {
    return http.get('/admin/menu/tree')
  },
  add(data) {
    return http.post('/admin/menu', data)
  },
  edit(data) {
    return http.put('/admin/menu', data)
  },
  del(data) {
    return http.delete(`/admin/menu/${data.ids[0]}`)
  },
}

export default routerApi
